﻿using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.Mvc;
using StarsAdmin.Application.File.Dtos;
using StarsAdmin.Core.BaseService;
using StarsAdmin.Core.DI;

namespace StarsAdmin.Application.File.Services
{
    public interface IFileService : IGetBaseService<FileDto>, IDeleteBaseService, IDependency
    {
        /// <summary>
        /// 上传
        /// </summary>
        /// <param name="file"></param>
        /// <param name="fileDirectory"></param>
        /// <returns></returns>
        Task<FileDto> UploadFileAsync(IFormFile file, string fileDirectory = "upload");

        /// <summary>
        /// 批量上传
        /// </summary>
        /// <param name="files"></param>
        /// <param name="fileDirectory"></param>
        /// <returns></returns>
        Task<List<FileDto>> UploadFilesAsync(IFormFileCollection files, string fileDirectory = "upload");

        Task<FileStreamResult?> DownloadFileAsync(DownloadFileInput input);
    }
}